While we don't technically need the app to download and apply
updates, we do require it for notifying the user about available
updates and listing extensions with pending updates.
So instead of intransparently applying updates in the background
without the user noticing, disable updates altogether if the
Extensions app is not installed.
https://gitlab.gnome.org/GNOME/gnome-shell/issues/2346
}
function downloadExtensionUpdate(uuid) {
+ if (!Main.extensionManager.updatesSupported)
+ return;
+
let dir = Gio.File.new_for_path(
GLib.build_filenamev([global.userdatadir, 'extension-updates', uuid]));
}
function checkForUpdates() {
+ if (!Main.extensionManager.updatesSupported)
+ return;
+
let metadatas = {};
Main.extensionManager.getUuids().forEach(uuid => {
let extension = Main.extensionManager.lookup(uuid);
ExtensionDownloader.checkForUpdates();
}
+ get updatesSupported() {
+ const appSys = Shell.AppSystem.get_default();
+ return appSys.lookup_app('org.gnome.Extensions.desktop') !== null;
+ }
+
lookup(uuid) {
return this._extensions.get(uuid);
}
}
_installExtensionUpdates() {
+ if (!this.updatesSupported)
+ return;
+
FileUtils.collectFromDatadirs('extension-updates', true, (dir, info) => {
let fileType = info.get_file_type();
if (fileType !== Gio.FileType.DIRECTORY)